keyword only on a type conversion operator 關(guān)鍵字。類型轉(zhuǎn)換運(yùn)算符的符號(hào)總是
keyword is used to declare an implicit user-defined type conversion operator 關(guān)鍵字用于聲明隱式的用戶定義類型轉(zhuǎn)換運(yùn)算符。
for a type conversion operator, either the operand or the return type must be of the data type of the class or structure 對(duì)于類型轉(zhuǎn)換運(yùn)算符,操作數(shù)或返回類型必須是類或結(jié)構(gòu)的數(shù)據(jù)類型。
if you have defined a class or structure, you can define a type conversion operator between the type of your class or structure and another data type such as 如果已定義了類或結(jié)構(gòu),則可以定義類或結(jié)構(gòu)的類型與其他數(shù)據(jù)類型(如
you declare two operands to define a binary operator, and you declare one operand to define a unary operator, including a type conversion operator 聲明兩個(gè)操作數(shù)以定義一個(gè)二元運(yùn)算符,聲明一個(gè)操作數(shù)以定義一個(gè)一元運(yùn)算符(包括類型轉(zhuǎn)換運(yùn)算符)。